/**
 * ...
 * @author Krzysztof Rozalski
 */

package test;

import hapi.math.MathUtil;
import hapi.physics.Speed;
import hapi.unit.HapiTestCase;

using hapi.physics.PhysicsFactoryMethods;

class TestSpeed extends HapiTestCase {

	public function testFactoryMethods() {
		var tenKph:Speed = 10.kmPerHour();
		var fiveMph = 5.milesPerHour();
		var sixMpS = 6.metersPerSecond();
		assertCondition(MathUtil.floatEquals(10.0, tenKph.kmPerHour));
		assertFloatEqualsWithTolerance(5.0, fiveMph.milesPerHour);
		assertEquals(6.0, sixMpS.metersPerSecond);
	}
	
}